package org.liveboardgames.agricola.control.delegates
{
	import com.adobe.cairngorm.business.ServiceLocator;

	import flash.utils.setTimeout;

	import mx.collections.ListCollectionView;
	import mx.rpc.IResponder;

	import org.liveboardgames.agricola.control.delegates.action.AgricolaActionController;
	import org.liveboardgames.agricola.control.delegates.mock.GameFactory;
	import org.liveboardgames.agricola.model.AgricolaModelLocator;
	import org.liveboardgames.agricola.vo.Game;

	public class LoadGameDelegate
	{
		private var _responder:IResponder;

		private var _service:Object;

		public function LoadGameDelegate(responder:IResponder)
		{
			this._service = ServiceLocator.getInstance().getRemoteObject("loadGameService");
			this._responder = responder;
		}

		public function loadGame(gameId:int):void
		{
			var call:Object = _service.loadGame(gameId);
			call.resultHandler = _responder.result;
			call.faultHandler = _responder.fault;
		}
	}
}